Allow unknown root directory.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 5 Feb 2019 18:55:42 +0000 (18:55 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 5 Feb 2019 18:55:42 +0000 (18:55 +0000)
commit94e302a7c71d020fb30ef0cc3f6337c5f481793e
treeb9b68c3d8faee5ff9c7dd89c6b338f0bb3e537c8
parentb742b6f15799ae42deabb645560b7ee15373de63
Allow unknown root directory.

To be efficient, the remap translator simply returns ports from the underlying
filesystem, and thus the root directory found through browsing '..' is the
underlying root, not the remap root. This should not be a reason for getcwd to
fail.

* sysdeps/mach/hurd/getcwd.c (_hurd_canonicalize_directory_name_internal): Do
not remove the heading slash if we got an unknown root directory.
(__getcwd): Do not fail with EGRATUITOUS if we got an unknown root directory.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-remap_getcwd.diff
sysdeps/mach/hurd/getcwd.c